This game is basically items dropping from the top of the screen and you need to open and close the box. If the box is open and the correct item fall into the correct box, you score a point. (eg. sari fall into indian box)
Variables:
/*load item in library onto stage*/
var iItem:MovieClip=new Item()
var mItem:MovieClip=new Item()
var cItem:MovieClip=new Item()
/*random function*/
var rand:int=4*Math.random()
var mCount:int
var iCount:int
var cCount:int
/*Arrays*/
var mArray=new Array()
var iArray=new Array()
var cArray=new Array()
MovieClips
Item [Class:Item]
/*Boxes at the bottom of the screen*/
mBox
cBox
iBox
Status
Currently discussing with Matthew Soh, a Year 5 student, on how to resolve the coding problems.
Progress:
I decided to put a MovieClip with three colours first to make it simple and focus on the coding, then replace the boxes with the actual image. I found out how to do the random function so that the colour will change every time the file is played.
Problem:
The items load together so it looks like a long stream of the items.
Product: NOTE: If nothing happens, refresh the page or right-click on the swf file and click "Play".
Progress:
I included a timer which will lapse a while before the next item created so that it will not become a "stream".
Code:
var myTimer:Timer=new Timer(2000);
myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
myTimer.start();
function timerHandler(evt:TimerEvent):void {
...
}
Also, I changed the mCount, iCount, cCount values so that all 3 lanes do not have the same colour.
Problem:
The next mItem is not of a different colour than the previous one.
Progress:
The previous mItem is different from the next mItem, and so forth for cItem and iItem. I put the random function inside the timer function instead of outside it. Problem:
The format is predictable as the items in the same row are the same. There is only three possible combination: G R B, R B G, B R G
Progress:
Tried hitTestObject(), hitTestPoint(), and push(), but still not working. Problem:
All mItem, cItem, and iItem are Item() not MovieClip(), so cannot hitTestObject().
All mItem, cItem, and iItem x coordinates are reseted to top of screen each time timer is activated.
Draft 6
Fla File
Progress
Finally solved the hitTestObject() after discussing with Matthew. Solution
stage.addEventListener(Event.ENTER_FRAME, cfall);
function cfall(e:Event):void {
cItem.y+=3;
if (cItem.hitTestObject(cBox)) {
if (cBox.currentFrame==2) { check if box is open if (cItem.currentFrame==2) {
check if item is red
removeChild(cItem);
stage.removeEventListener(e.type, arguments.callee); //so that object will not keep falling after entering box
score+=100;
trace("YAY!");
...
}
Draft 7
Fla File
Progress
Improved Graphics!!
<To Be Continued...>
Game 2: Taxi Game [On Hold]
Introduction
Variables
<Insert Text Here> Movie Clips <Insert Text Here>
Status
[On Hold] Currently discussing with Matthew Soh, a Year 5 student, on how to resolve the coding problems.
Draft 1
Fla File <Insert Text Here> Progress <Insert Text Here> Problems <Insert Text Here>
Draft 2
Fla File <Insert Text Here> Progress <Insert Text Here> Problems <Insert Text Here>
Draft 3
Fla File <Insert Text Here> Progress <Insert Text Here> Problems <Insert Text Here>
Website
Version 1.1a
Version 1.1b
Version 2.1
Version 2.2
Version 2.3
Version 3.1
Version 3.2
Version 4.1
Version 4.2
Currently not available. Please refer to version 4.3 for updates.
Today, we went on a trip down to the city. Firstly, we went to Orchard Road to witness the Thaipusam festival first hand. I was surprised that traffic was flowing normally despite the Thaipusam possession being held. This shows how carefully the Singapore government has planned the whole thing. There was also two SBS Transit officers present to direct confused passengers to the nearest bus-stop as the bus-stop outside Dhoby Ghaut MRT was closed.
Without prior knowledge, I was surprised when I saw the men carrying large metal structures with many spokes that pierce into their bare bodies. After researching, I found out that they are called kavadis and they had been walking four killometres long carrying it!
(To Be Continued)
Thaipusam
Trip on 20 Jan 2011.
(See Chinese New year)
Chingay
To Be Confirmed
Journal
25/01/11
Sent the two games to Matthew Soh, the Sec 4 Infocomm chairman.
Discussed with Matthew Soh. We only managed to discussed the first game before he had to go. Would be discussing the second game over the weekends and improve game
Table of Contents
The Unreleased Game
a.k.a The Taxi GameGame 1: Items Dropping
Introduction
This game is basically items dropping from the top of the screen and you need to open and close the box. If the box is open and the correct item fall into the correct box, you score a point. (eg. sari fall into indian box)Variables:
/*load item in library onto stage*/
var iItem:MovieClip=new Item()
var mItem:MovieClip=new Item()
var cItem:MovieClip=new Item()
/*random function*/
var rand:int=4*Math.random()
var mCount:int
var iCount:int
var cCount:int
/*Arrays*/
var mArray=new Array()
var iArray=new Array()
var cArray=new Array()
MovieClips
Item [Class:Item]
/*Boxes at the bottom of the screen*/
mBox
cBox
iBox
Status
Currently discussing with Matthew Soh, a Year 5 student, on how to resolve the coding problems.Draft 1
Fla File:Product:
Progress:
I decided to put a MovieClip with three colours first to make it simple and focus on the coding, then replace the boxes with the actual image. I found out how to do the random function so that the colour will change every time the file is played.
Problem:
The items load together so it looks like a long stream of the items.
Draft 2
Fla File:Product:
NOTE: If nothing happens, refresh the page or right-click on the swf file and click "Play".
Progress:
I included a timer which will lapse a while before the next item created so that it will not become a "stream".
Code:
var myTimer:Timer=new Timer(2000);
myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
myTimer.start();
function timerHandler(evt:TimerEvent):void {
...
}
Also, I changed the mCount, iCount, cCount values so that all 3 lanes do not have the same colour.
Problem:
The next mItem is not of a different colour than the previous one.
Draft 3
Fla File:Product:
Progress:
The previous mItem is different from the next mItem, and so forth for cItem and iItem. I put the random function inside the timer function instead of outside it.
Problem:
The format is predictable as the items in the same row are the same. There is only three possible combination: G R B, R B G, B R G
Draft 4
Fla File:Product:
Progress:
All the mItem, cItem, and iItem are random.
Problem:
All the mItem, cItem, and iItem cannot hit box.
Draft 5
Fla File:Product:
Progress:
Tried hitTestObject(), hitTestPoint(), and push(), but still not working.
Problem:
All mItem, cItem, and iItem are Item() not MovieClip(), so cannot hitTestObject().
All mItem, cItem, and iItem x coordinates are reseted to top of screen each time timer is activated.
Draft 6
Fla FileProgress
Finally solved the hitTestObject() after discussing with Matthew.
Solution
stage.addEventListener(Event.ENTER_FRAME, cfall);
function cfall(e:Event):void {
cItem.y+=3;
if (cItem.hitTestObject(cBox)) {
if (cBox.currentFrame==2) {
check if box is open
if (cItem.currentFrame==2) {
check if item is red
removeChild(cItem);
stage.removeEventListener(e.type, arguments.callee);
//so that object will not keep falling after entering box
score+=100;
trace("YAY!");
...
}
Draft 7
Fla FileProgress
Improved Graphics!!
<To Be Continued...>
Game 2: Taxi Game [On Hold]
Introduction
Variables<Insert Text Here>
Movie Clips
<Insert Text Here>
Status
[On Hold]Currently discussing with Matthew Soh, a Year 5 student, on how to resolve the coding problems.
Draft 1
Fla File<Insert Text Here>
Progress
<Insert Text Here>
Problems
<Insert Text Here>
Draft 2
Fla File<Insert Text Here>
Progress
<Insert Text Here>
Problems
<Insert Text Here>
Draft 3
Fla File<Insert Text Here>
Progress
<Insert Text Here>
Problems
<Insert Text Here>
Website
Version 1.1a
Version 1.1b
Version 2.1
Version 2.2
Version 2.3
Version 3.1
Version 3.2
Version 4.1
Version 4.2
Currently not available. Please refer to version 4.3 for updates.Version 4.3
Version 5.1
Version 5.2
Version 5.3
Version 5.4
Version 6.1a
Version 6.1b
Version 6.2
Version 6.3 [NEW]
Version 6.4 [NEW]
Latest Version
Field Trips (Reflections)
Deepavali
[5 Nov 2010]Trip on 4 Nov 2010.
Hari Raya Haji
[10 Sep 2010]Trip on 10 Sep 2010
Christmas
[25 Dec 2010]No trip organised.
Chinese New Year
[2 Feb 2011]Trip on 20 Jan 2011.
Today, we went on a trip down to the city. Firstly, we went to Orchard Road to witness the Thaipusam festival first hand. I was surprised that traffic was flowing normally despite the Thaipusam possession being held. This shows how carefully the Singapore government has planned the whole thing. There was also two SBS Transit officers present to direct confused passengers to the nearest bus-stop as the bus-stop outside Dhoby Ghaut MRT was closed.
Without prior knowledge, I was surprised when I saw the men carrying large metal structures with many spokes that pierce into their bare bodies. After researching, I found out that they are called kavadis and they had been walking four killometres long carrying it!
(To Be Continued)
Thaipusam
Trip on 20 Jan 2011.(See Chinese New year)
Chingay
To Be ConfirmedJournal
25/01/11
Sent the two games to Matthew Soh, the Sec 4 Infocomm chairman.28/01/11
Today researched on Racial Harmony and the government. Search using government search engine (URL:http://sgms.internet.gov.sg/). Also searched library archives (URL: http://stars.nhb.gov.sg/stars/public/) and also Singapore Laws (URL:http://statutes.agc.gov.sg/non_version/html/homepage.html).24/02/11
Discussed with Matthew Soh. We only managed to discussed the first game before he had to go. Would be discussing the second game over the weekends and improve game